/**
 * @description: 氚云订单信息批量导入
 * @version: 0.0.1
 * @author: ljr
 * @Date: 2023-09-12 16:35:58
 */

import { Inject, Controller, Post } from '@midwayjs/core';
import { Context } from '@midwayjs/koa';

import { ChuanyunImportFileService } from "../service/chuanyun.import.file.service"

@Controller('/api/v1/chuanyun')
export class chuanyunImportFileController {
  @Inject()
  ctx: Context;
  @Inject()
  ChuanyunImportFileService: ChuanyunImportFileService;

  /**
   * @summary 订单数据导入
   * @description 订单数据导入
   * @router post /api/v1/chuanyun/uploadOrdersFile
   * @request body id  *body
   * @response 200 baseResponse 返回结果
   */
  @Post('/uploadOrdersFile')
  async uploadOrdersFile(): Promise<any> {
    // 获取流
    // const stream = this.ctx.files[0];
    return await this.ChuanyunImportFileService.uploadOrdersFile();
  }

}